public class Test {
    public static boolean judge (String str) {
        for(int i= 0;i<str.length()/2;i++){
            if(str.charAt(i) != str.charAt(str.length()-1-i))
                return false;
        }
        return true;
    }
    public static int  sqrt (int x) {
        // write code here
        if(x == 0 || x == 1) return x;
        long r = x;
        while(x/r<r)
            r = (r+x/r)/2;
        return (int)r;
    }

    public static void main(String[] args) {
        //1. 回文
       if(judge("absba")){
           System.out.println("是回文");
       }else{
           System.out.println("不是回文");
       }

        System.out.println("-------------------------");
       //2. 实现函数 int sqrt(int x)
        System.out.println(sqrt(3));


    }
}
